package com.hadwinling.lotdb.service;

import org.apache.iotdb.rpc.IoTDBConnectionException;
import org.apache.iotdb.rpc.StatementExecutionException;
import org.apache.iotdb.session.Session;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @author: hadwinling
 * @time: 2021/2/5 下午9:24
 */
@Service
public class LotdbService {

    @Autowired
    private Session lotdbSession;


    /**
     *  根据storageGroupId 设置存储组
     * @param storageGroupId
     */
    public void setStorageGroup(String storageGroupId) {
        try {
            lotdbSession.setStorageGroup(storageGroupId);
        } catch (IoTDBConnectionException e) {
            e.printStackTrace();
        } catch (StatementExecutionException e) {
            e.printStackTrace();
        }
    }




}
